# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Gabriel Martinez < reitaka at gmail dot com >

pkgname=libusbmuxd
pkgver=1.0.10+13+gc724e70
pkgrel=1
pkgdesc="USB Multiplex Daemon"
url="http://marcansoft.com/blog/iphonelinux/usbmuxd/"
arch=('x86_64')
license=('LGPL2.1' 'GPL2')
depends=('libusb' 'libplist')
makedepends=(git)
conflicts=('usbmuxd<1.0.9')
_commit=c724e70fb52ba45291dc73a2e369c0c5bae0ec2e  # master
source=("git+https://github.com/libimobiledevice/libusbmuxd#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

check() {
  cd $pkgname
  make check
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
}
